import java.util.Scanner;

public class 结婚判断 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入小王的性别");
        String wang = sc.next();
        System.out.println("请输入小张的性别");
        String zhang = sc.next();
        if (wang.equals(zhang)) {
            System.out.println("不能结婚");
        } else {
            System.out.println("可以结婚");
        }




    }
}